package test0103.test01;

public class CompanyMS {

    public static void main(String[] args) {

        // (1)创建部门对象
        Department devDepartment = new Department(1, "开发部");
        Department testDepartment = new Department(2, "测试部");

        // (2)创建职位对象
        Position juniorDevPosition = new Position(1, "初级开发", 5000.00, devDepartment);
        Position midDevPosition = new Position(2, "中级开发", 8000.00, devDepartment);
        Position seniorDevPosition = new Position(3, "高级开发", 12000.00, devDepartment);
        Position blackBoxTester = new Position(4, "黑盒测试", 3000.00, testDepartment);
        Position whiteBoxTester = new Position(5, "白盒测试", 6000.00, testDepartment);

        // (3)创建员工对象
        Employee zhangSan = new Employee(1, "张三", "男", "2000-11-11", "本科", juniorDevPosition);
        Employee liSi = new Employee(2, "李四", "男", "2001-04-13", "大专", midDevPosition);
        Employee wangWu = new Employee(3, "王五", "男", "2002-02-14", "本科", seniorDevPosition);
        Employee zhaoLiu = new Employee(4, "赵六", "女", "2001-08-08", "大专", blackBoxTester);
        Employee sunQi = new Employee(5, "孙七", "女", "2000-06-17", "本科", whiteBoxTester);

        // (4)组装对象关系
        juniorDevPosition.setDepartment(devDepartment);
        midDevPosition.setDepartment(devDepartment);
        seniorDevPosition.setDepartment(devDepartment);

        blackBoxTester.setDepartment(testDepartment);
        whiteBoxTester.setDepartment(testDepartment);

        zhangSan.setPosition(juniorDevPosition);
        liSi.setPosition(midDevPosition);
        wangWu.setPosition(seniorDevPosition);
        zhaoLiu.setPosition(blackBoxTester);
        sunQi.setPosition(whiteBoxTester);

        // (5)打印对象信息
        System.out.println(devDepartment);
        System.out.println(testDepartment);

        System.out.println(juniorDevPosition);
        System.out.println(midDevPosition);
        System.out.println(seniorDevPosition);
        System.out.println(blackBoxTester);
        System.out.println(whiteBoxTester);

        System.out.println(zhangSan);
        System.out.println(liSi);
        System.out.println(wangWu);
        System.out.println(zhaoLiu);
        System.out.println(sunQi);

    }

}
